<!DOCTYPE html><html lang="en" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Bulua</title><meta name="author" content="Bulua"><meta name="copyright" content="Bulua"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="No matter how far you may fly, never forget where you come from.">
<meta property="og:type" content="website">
<meta property="og:title" content="Bulua">
<meta property="og:url" content="http://bulua.gitee.io/index.html">
<meta property="og:site_name" content="Bulua">
<meta property="og:description" content="No matter how far you may fly, never forget where you come from.">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="https://gitee.com/bulua/bulua_img/raw/master/tubiao.jpg">
<meta property="article:author" content="Bulua">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://gitee.com/bulua/bulua_img/raw/master/tubiao.jpg"><link rel="shortcut icon" href="https://gitee.com/bulua/bulua_img/raw/master/tubiao.jpg"><link rel="canonical" href="http://bulua.gitee.io/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: undefined,
  translate: {"defaultEncoding":2,"translateDelay":0,"msgToTraditionalChinese":"繁","msgToSimplifiedChinese":"簡"},
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: 'Copy successfully',
    error: 'Copy error',
    noSupport: 'The browser does not support'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: 'days',
  date_suffix: {
    just: 'Just',
    min: 'minutes ago',
    hour: 'hours ago',
    day: 'days ago',
    month: 'months ago'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: {"chs_to_cht":"Traditional Chinese Activated Manually","cht_to_chs":"Simplified Chinese Activated Manually","day_to_night":"Dark Mode Activated Manually","night_to_day":"Light Mode Activated Manually","bgLight":"#49b1f5","bgDark":"#121212","position":"top-center"},
  source: {
    jQuery: 'https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js',
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
    },
    fancybox: {
      js: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js',
      css: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: true,
  isanchor: true
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'Bulua',
  isPost: false,
  isHome: true,
  isHighlightShrink: false,
  isToc: false,
  postUpdate: '2021-11-28 16:47:23'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if (GLOBAL_CONFIG_SITE.isHome && /iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    document.addEventListener('pjax:complete', detectApple)})(window)</script><link rel="stylesheet" href="/css/custom.css" media="defer" onload="this.media='all'"><meta name="generator" content="Hexo 5.4.0"></head><body><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src= "" data-lazy-src="https://gitee.com/bulua/bulua_img/raw/master/tubiao.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/archives/"><div class="headline">Articles</div><div class="length-num">8</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/tags/"><div class="headline">Tags</div><div class="length-num">3</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> Home</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> About</span></a></div></div></div></div><div class="page" id="body-wrap"><header class="full_page" id="page-header" style="background-image: url('https://gitee.com/bulua/bulua_img/raw/master/bgimg01.jpeg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">Bulua</a></span><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> Home</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> About</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="site-info"><h1 id="site-title">Bulua</h1><div id="site_social_icons"><a class="social-icon" href="https://github.com/Bulua" target="_blank" title="Github"><i class="fab fa-github"></i></a></div></div><div id="scroll-down"><i class="fas fa-angle-down scroll-down-effects"></i></div></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2021/11/15/LDA/" title="LDA">     <img class="post_bg" src= "" data-lazy-src="https://gitee.com/bulua/bulua_img/raw/master/download.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="LDA"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/11/15/LDA/" title="LDA">LDA</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2021-11-15T12:54:12.000Z" title="Created 2021-11-15 20:54:12">2021-11-15</time></span></div><div class="content">

线性判别分析的处理流程
计算每个类别的均值u_i, 全局样本均值u；
计算类内散度矩阵S_w，全局散度矩阵S_t，类间散度矩阵S_b；
对矩阵S[-1, w] S_b做特征值分解（-1为上标，w为下标）；
取最大的d&#39;个特征值所对应的特征向量；
计算投影矩阵；

</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2021/11/15/PCA/" title="PCA">     <img class="post_bg" src= "" data-lazy-src="https://gitee.com/bulua/bulua_img/raw/master/download.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="PCA"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/11/15/PCA/" title="PCA">PCA</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2021-11-15T12:34:48.000Z" title="Created 2021-11-15 20:34:48">2021-11-15</time></span></div><div class="content">

主成分分析的处理流程假设N个d维样本，进行PCA处理：

将原始数据按列组成d行n列矩阵X；
将X的每一样本去中心化，即减去这一行的均值；
求出协方差矩阵；
求出协方差矩阵的特征值以及对应的特征向量；
将特征向量按对应的特征值大小从上到下按行排列成矩阵，取前m行组成矩阵P；
Y=PX即为降维到m维后的数据；

</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2021/10/19/Kernel-Function/" title="核函数">     <img class="post_bg" src= "" data-lazy-src="https://gitee.com/bulua/bulua_img/raw/master/download.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="核函数"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/10/19/Kernel-Function/" title="核函数">核函数</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2021-10-19T11:13:40.000Z" title="Created 2021-10-19 19:13:40">2021-10-19</time></span></div><div class="content">核函数K（kernel function）就是指K(x, y) = &lt;f(x), f(y)&gt;，其中x和y是n维的输入值，f(·) 是从n维到m维的映射（通常，m&gt;&gt;n）。&lt;x, y&gt;是x和y的内积（inner product）(也称点积（dot product）)。 


##1、核函数
如果你看了上面的定义还是不够明白，那么我举个小小的栗子：
令 x = (x1, x2, x3, x4); y = (y1, y2, y3, y4);令 f(x) = (x1x1, x1x2, x1x3, x1x4, x2x1, x2x2, x2x3, x2x4, x3x1, x3x2, x3x3, x3x4, x4x1, x4x2, x4x3, x4x4); f(y)亦然；令核函数 K(x, y) = (&lt;x, y&gt;)^2.接下来，让我们带几个简单的数字进去看看是个什么效果：x = (1, 2, 3, 4); y = (5, 6, 7, 8). 那么：f(x) = ( 1, 2, 3, 4, 2, 4, 6, 8, 3, 6, 9, 12, 4, 8,  ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2021/10/12/svm-xia/" title="支持向量机（下）">     <img class="post_bg" src= "" data-lazy-src="https://gitee.com/bulua/bulua_img/raw/master/download.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="支持向量机（下）"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/10/12/svm-xia/" title="支持向量机（下）">支持向量机（下）</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2021-10-12T00:31:00.000Z" title="Created 2021-10-12 08:31:00">2021-10-12</time></span></div><div class="content">上篇仅介绍了SVM的基本概念，本篇着重讲解SVM中的最佳线性分类器（最大边界超平面）是如何求得的。 


4.求解超平面4.1几何间隔上一小节给出二维问题下最佳线性分割的标准，就是分割线到两类边界点的距离最“宽”，那么这个“宽度”怎么量化和求解呢？

我们知道，点  直线Ax+By+c=0的距离（中学的知识点），可以表示为：

在我们的二维问题中，第i个点的坐标为  ，直线为  （为了打公式方便，后面不区分向量和其转置，省略T标志，统一写成  ），将上式替换，  到分割直线的距离为：

有的人也许对分母||W||感到陌生，这里多做点解释。
||W||是向量W的2-范数（  范数），一般我们说向量长度，指的是向量的2-范数。例如这里的  ，它的2-范数就是  （通常会省略下标2，一般说||W||就是指  ），而它的p-范数（  范数）就是  。
这里给出向量范数的一般形式。对于n维向量  ，它的p-范数为：

 这个公式的学名叫做几何间隔，几何间隔表示的是点到超平面的欧氏距离（还记得上次讲线性回归时强调要记住这个名称吧？）。
以上是单个点到某个超平面的距离定义（在这个具体的二维例子中是一 ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2021/10/12/svm-shang/" title="支持向量机（上）">     <img class="post_bg" src= "" data-lazy-src="https://gitee.com/bulua/bulua_img/raw/master/download.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="支持向量机（上）"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/10/12/svm-shang/" title="支持向量机（上）">支持向量机（上）</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2021-10-12T00:30:53.000Z" title="Created 2021-10-12 08:30:53">2021-10-12</time></span></div><div class="content">SVM支持向量机，号称机器学习的拦路虎。江湖传言，遇到了他，机器学习就会从入门到放弃。另一方面也就是说，只要搞定了SVM，后面的算法模型学起来都是小意思。


1.什么是SVM由于SVM较复杂，我分两篇来进行阐述，本篇仅介绍SVM的基本概念。
先看下官方定义：

支持向量机方法是建立在统计学习理论的VC 维理论和结构风险最小原理基础上的，根据有限的样本信息在模型的复杂性和学习能力之间寻求最佳折衷，以期获得最好的泛化能力。

VC 维，结构风险，有限样本，模型复杂性，最佳折衷，泛化能力，这一切……真是让人摸不着头脑……
行了，文绉绉的理论从来看不懂，我们还是从算法看起吧。
SVM一般用于解决二分类问题（也可以解决多分类和回归问题，本文暂不涉及），数学化语言概述如下：
样本数据：n个样本，p个输入  ，1个输出y
第i个样本的输入： 
输出y：一般用1和-1作为两类样本的标签
训练样本集D：

训练目的：以训练样本为研究对象，在样本的特征空间中找到一个超平面 ，将两类样本（＋1和－1）有效分开，其中 
然而，这些个公式……更是看的云里雾里……
没关系，抽象的数学语言难以理解，我们就从直观的 ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2021/10/11/Logistic-Regression/" title="Logistic-Regression">     <img class="post_bg" src= "" data-lazy-src="https://gitee.com/bulua/bulua_img/raw/master/download.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Logistic-Regression"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/10/11/Logistic-Regression/" title="Logistic-Regression">Logistic-Regression</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2021-10-11T11:29:24.000Z" title="Created 2021-10-11 19:29:24">2021-10-11</time></span></div><div class="content"> 机器学习算法中的监督式学习可以分为2大类： 

 分类模型：目标变量是分类变量（离散值）； 
 回归模型：目标变量是连续性数值变量。 

逻辑回归通常用于解决分类问题，例如，业界经常用它来预测：客户是否会购买某个商品，借款人是否会违约等等。 


实际上，“分类”是应用逻辑回归的目的和结果，但中间过程依旧是“回归”。
为什么这么说？
因为通过逻辑回归模型，我们得到的计算结果是0-1之间的连续数字，可以把它称为“可能性”（概率）。对于上述问题，就是：客户购买某个商品的可能性，借款人违约的可能性。
然后，给这个可能性加一个阈值，就成了分类。例如，算出贷款违约的可能性&gt;0.5，将借款人预判为坏客户。
1、线性回归考虑最简单的情况，即只有一个自变量的情况。比方说广告投入金额x和销售量y的关系，散点图如下，这种情况适用一元线性回归。 

但在许多实际问题中，因变量y是分类型，只取0、1两个值，和x的关系不是上面那样。假设我们有这样一组数据：给不同的用户投放不同金额的广告，记录他们购买广告商品的行为，1代表购买，0代表未购买。 

假如此时依旧考虑线性回归模型，得到如下拟合曲线： 

线性 ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2021/09/16/zui-hou-yi-kuai-shi-tou-de-zhong-liang/" title="最后一块石头的重量">     <img class="post_bg" src= "" data-lazy-src="https://cdn.jsdelivr.net/gh/18WantTobeSinger/PictureBed/LeetCode-cover.webp" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="最后一块石头的重量"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/09/16/zui-hou-yi-kuai-shi-tou-de-zhong-liang/" title="最后一块石头的重量">最后一块石头的重量</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2021-09-16T05:14:04.000Z" title="Created 2021-09-16 13:14:04">2021-09-16</time></span></div><div class="content">
      Life is a journey, not the destination, but the scenery along the should be and the mood at the view. 





1046. 最后一块石头的重量有一堆石头，每块石头的重量都是正整数。
每一回合，从中选出两块 最重的 石头，然后将它们一起粉碎。假设石头的重量分别为 x 和 y，且 x &lt;= y。那么粉碎的可能结果如下：

如果 x == y，那么两块石头都会被完全粉碎；
如果 x != y，那么重量为 x 的石头将会完全粉碎，而重量为 y 的石头新重量为 y-x。

最后，最多只会剩下一块石头。返回此石头的重量。如果没有石头剩下，就返回 0。
示例：1234567输入：[2,7,4,1,8,1]输出：1解释：先选出 7 和 8，得到 1，所以数组转换为 [2,4,1,1,1]，再选出 2 和 4，得到 2，所以数组转换为 [2,1,1,1]，接着是 2 和 1，得到 1，所以数组转换为 [1,1,1]，最后选出 1 和 1，得到 0，最终数组转换为 [1]，这就是最后 ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2020/06/21/hello-world/" title="倒数第N个字符串">     <img class="post_bg" src= "" data-lazy-src="https://cdn.jsdelivr.net/gh/18WantTobeSinger/PictureBed/PTA.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="倒数第N个字符串"></a></div><div class="recent-post-info"><a class="article-title" href="/2020/06/21/hello-world/" title="倒数第N个字符串">倒数第N个字符串</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2020-06-21T03:34:10.000Z" title="Created 2020-06-21 11:34:10">2020-06-21</time></span></div><div class="content">123456789&quot;姑娘有心事？&quot;书生抿嘴品茶问到。 少女：&quot;公子与王公子可是熟识？&quot; 书生：&quot;世交。&quot; 少女：&quot;那下次你与他一起来吧。&quot; 书生：&quot;他不喜品茶。&quot; 少女：&quot;没关系，那他喜欢什么，我可以慢慢学。&quot; 书生：&quot;他喜欢我。&quot;                                                                    ----- 网易云热评




倒数第N个字符串题目描述：给定一个完全由小写英文字母组成的字符串等差递增序列，该序列中的每个字符串的长度固定为 L，从 L 个 a 开始，以 1 为步长递增。例如当 L 为 3 时，序列为 { aaa, aab, aac, …, aaz, aba, abb, …, abz, …, zzz }。这个序列的倒数第27个字符串就是 zyz。对于任意给定的 L，本题要求你给出对应序列倒数第 N 个字符串。
输入格式：输入在一行中给出两个正整数 L（2 ≤ L ≤  ...</div></div></div><nav id="pagination"><div class="pagination"><span class="page-number current">1</span></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src= "" data-lazy-src="https://gitee.com/bulua/bulua_img/raw/master/tubiao.jpg" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">Bulua</div><div class="author-info__description">No matter how far you may fly, never forget where you come from.</div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/archives/"><div class="headline">Articles</div><div class="length-num">8</div></a></div><div class="card-info-data-item is-center"><a href="/tags/"><div class="headline">Tags</div><div class="length-num">3</div></a></div></div><a class="button--animated" id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/xxxxxx"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/Bulua" target="_blank" title="Github"><i class="fab fa-github"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>Announcement</span></div><div class="announcement_content">This is my Blog</div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>Recent Post</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2021/11/15/LDA/" title="LDA"><img src= "" data-lazy-src="https://gitee.com/bulua/bulua_img/raw/master/download.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="LDA"/></a><div class="content"><a class="title" href="/2021/11/15/LDA/" title="LDA">LDA</a><time datetime="2021-11-15T12:54:12.000Z" title="Created 2021-11-15 20:54:12">2021-11-15</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/11/15/PCA/" title="PCA"><img src= "" data-lazy-src="https://gitee.com/bulua/bulua_img/raw/master/download.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="PCA"/></a><div class="content"><a class="title" href="/2021/11/15/PCA/" title="PCA">PCA</a><time datetime="2021-11-15T12:34:48.000Z" title="Created 2021-11-15 20:34:48">2021-11-15</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/10/19/Kernel-Function/" title="核函数"><img src= "" data-lazy-src="https://gitee.com/bulua/bulua_img/raw/master/download.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="核函数"/></a><div class="content"><a class="title" href="/2021/10/19/Kernel-Function/" title="核函数">核函数</a><time datetime="2021-10-19T11:13:40.000Z" title="Created 2021-10-19 19:13:40">2021-10-19</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/10/12/svm-xia/" title="支持向量机（下）"><img src= "" data-lazy-src="https://gitee.com/bulua/bulua_img/raw/master/download.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="支持向量机（下）"/></a><div class="content"><a class="title" href="/2021/10/12/svm-xia/" title="支持向量机（下）">支持向量机（下）</a><time datetime="2021-10-12T00:31:00.000Z" title="Created 2021-10-12 08:31:00">2021-10-12</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/10/12/svm-shang/" title="支持向量机（上）"><img src= "" data-lazy-src="https://gitee.com/bulua/bulua_img/raw/master/download.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="支持向量机（上）"/></a><div class="content"><a class="title" href="/2021/10/12/svm-shang/" title="支持向量机（上）">支持向量机（上）</a><time datetime="2021-10-12T00:30:53.000Z" title="Created 2021-10-12 08:30:53">2021-10-12</time></div></div></div></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>Tags</span></div><div class="card-tag-cloud"><a href="/tags/%E5%8A%9B%E6%89%A3/" style="font-size: 1.1em; color: #999">力扣</a> <a href="/tags/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0/" style="font-size: 1.5em; color: #99a9bf">机器学习</a> <a href="/tags/%E7%AE%97%E6%B3%95/" style="font-size: 1.1em; color: #999">算法</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>Archives</span></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/11/"><span class="card-archive-list-date">November 2021</span><span class="card-archive-list-count">2</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/10/"><span class="card-archive-list-date">October 2021</span><span class="card-archive-list-count">4</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/09/"><span class="card-archive-list-date">September 2021</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2020/06/"><span class="card-archive-list-date">June 2020</span><span class="card-archive-list-count">1</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>Info</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">Article :</div><div class="item-count">8</div></div><div class="webinfo-item"><div class="item-name">Run time :</div><div class="item-count" id="runtimeshow" data-publishDate="2021-11-28T08:47:22.927Z"></div></div><div class="webinfo-item"><div class="item-name">UV :</div><div class="item-count" id="busuanzi_value_site_uv"></div></div><div class="webinfo-item"><div class="item-name">PV :</div><div class="item-count" id="busuanzi_value_site_pv"></div></div><div class="webinfo-item"><div class="item-name">Last Push :</div><div class="item-count" id="last-push-date" data-lastPushDate="2021-11-28T08:47:22.927Z"></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2021  <i id="heartbeat" class="fa fas fa-heartbeat"></i> Bulua</div></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/HCLonely/images@master/others/heartbeat.min.css"></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="translateLink" type="button" title="Switch Between Traditional Chinese And Simplified Chinese">繁</button><button id="darkmode" type="button" title="Switch Between Light And Dark Mode"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="Toggle between single-column and double-column"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="Setting"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="Back To Top"><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="/js/tw_cn.js"></script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload/dist/lazyload.iife.min.js"></script><script src="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.js"></script><div class="js-pjax"></div><div class="aplayer no-destroy" data-id="186016" data-server="netease" data-type="song" data-fixed="true" data-mini="true" data-listFolded="false" data-order="random" data-preload="none" data-autoplay=true muted></div><canvas class="fireworks" mobile="false"></canvas><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/fireworks.min.js"></script><script defer="defer" id="ribbon" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-ribbon.min.js" size="150" alpha="0.6" zIndex="-1" mobile="true" data-click="true"></script><script defer="defer" id="fluttering_ribbon" mobile="true" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-fluttering-ribbon.min.js"></script><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/activate-power-mode.min.js"></script><script>POWERMODE.colorful = true;
POWERMODE.shake = true;
POWERMODE.mobile = false;
document.body.addEventListener('input', POWERMODE);
</script><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.js"></script><script src="https://cdn.jsdelivr.net/gh/metowolf/MetingJS@1.2/dist/Meting.min.js"></script><script src="https://cdn.jsdelivr.net/npm/pjax/pjax.min.js"></script><script>let pjaxSelectors = [
  'title',
  '#config-diff',
  '#body-wrap',
  '#rightside-config-hide',
  '#rightside-config-show',
  '.js-pjax'
]

if (false) {
  pjaxSelectors.unshift('meta[property="og:image"]', 'meta[property="og:title"]', 'meta[property="og:url"]')
}

var pjax = new Pjax({
  elements: 'a:not([target="_blank"])',
  selectors: pjaxSelectors,
  cacheBust: false,
  analytics: false,
  scrollRestoration: false
})

document.addEventListener('pjax:send', function () {

  // removeEventListener scroll 
  window.removeEventListener('scroll', window.tocScrollFn)
  window.removeEventListener('scroll', scrollCollect)

  typeof preloader === 'object' && preloader.initLoading()
  
  if (window.aplayers) {
    for (let i = 0; i < window.aplayers.length; i++) {
      if (!window.aplayers[i].options.fixed) {
        window.aplayers[i].destroy()
      }
    }
  }

  typeof typed === 'object' && typed.destroy()

  //reset readmode
  const $bodyClassList = document.body.classList
  $bodyClassList.contains('read-mode') && $bodyClassList.remove('read-mode')

})

document.addEventListener('pjax:complete', function () {
  window.refreshFn()

  document.querySelectorAll('script[data-pjax]').forEach(item => {
    const newScript = document.createElement('script')
    const content = item.text || item.textContent || item.innerHTML || ""
    Array.from(item.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value))
    newScript.appendChild(document.createTextNode(content))
    item.parentNode.replaceChild(newScript, item)
  })

  GLOBAL_CONFIG.islazyload && window.lazyLoadInstance.update()

  typeof chatBtnFn === 'function' && chatBtnFn()
  typeof panguInit === 'function' && panguInit()

  // google analytics
  typeof gtag === 'function' && gtag('config', '', {'page_path': window.location.pathname});

  // baidu analytics
  typeof _hmt === 'object' && _hmt.push(['_trackPageview',window.location.pathname]);

  typeof loadMeting === 'function' && document.getElementsByClassName('aplayer').length && loadMeting()

  // Analytics
  if (false) {
    MtaH5.pgv()
  }

  // prismjs
  typeof Prism === 'object' && Prism.highlightAll()

  typeof preloader === 'object' && preloader.endLoading()
})

document.addEventListener('pjax:error', (e) => {
  if (e.request.status === 404) {
    pjax.loadUrl('/404.html')
  }
})</script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>